package com.hll.javaweb.servlet.mvc.service.impl;

import com.hll.javaweb.servlet.mvc.dao.StudentDao;
import com.hll.javaweb.servlet.mvc.dao.impl.StudentDaoImpl;
import com.hll.javaweb.servlet.mvc.pojo.Student;
import com.hll.javaweb.servlet.mvc.service.StudentService;

import java.util.List;

/**
 * @author hll
 * @create 2022-05-10 17:41
 */
public class StudentServiceImpl implements StudentService {
  private final StudentDao studentDao = new StudentDaoImpl();

  @Override
  public List<Student> getStudents() {
    return studentDao.getStudents();
  }

  @Override
  public Boolean addStudent(String name, String school) {
    return studentDao.addStudent(new Student(name, school));
  }
}
